// Class TForm sample

//----------------------------------------------------------------------------//

function Main()

  local oForm   := TForm():New()
  local oMenu   := TMenu():New()
  local oPopup  := TMenu():New( .t. )
  local oPopup2 := TMenu():New( .t. )

  oPopup2:Add( TMenuItem():New( "&New",  { || nil } ) )
  oPopup2:Add( TMenuItem():New( "&Edit", { || nil } ) )
  oPopup2:Add( TMenuItem():New( "&Del",  { || nil } ) )

  oPopup:Add( TMenuItem():New( "&Customers", oPopup2 ) )
  oPopup:Add( TMenuItem():New( "&Stock", { || nil } ) )
  oPopup:Add( TMenuItem():New( "&Calls", { || nil } ) )

  oMenu:Add( TMenuItem():New( "&Files",     oPopup ) )
  oMenu:Add( TMenuItem():New( "&Printing",  { || MsgInfo( "Printing" ) } ) )
  oMenu:Add( TMenuItem():New( "&Utilities", { || MsgInfo( "Utilities" ) } ) )
  oMenu:Add( TMenuItem():New( "&Info",      { || MsgInfo( "Info" ) } ) )
  oMenu:Add( TMenuItem():New( "&Help",      { || MsgInfo( "Help" ) } ) )

  oForm:SetText( "Five 1.0 - The 32 bits Clipper compatible compiler" )
  oForm:SetMenu( oMenu )

  oForm:bLClicked = { || MsgInfo( "Click" ) }

  oForm:ShowModal()

return nil

//----------------------------------------------------------------------------//
